package com.chen.service;

import com.chen.User;
import com.chen.dao.SpinguserMapper;
import com.chen.entity.Spinguser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/6/14.
 */

@SuppressWarnings("ALL")
@Service("SpinguserService")
public class SpinguserServiceImpl implements SpinguserService {

    @Autowired
    private SpinguserMapper spinguserMapper;


    @Override
    public Spinguser findSpinguserById(int id) {
        return null;
    }

    @Override
    public Integer deleteById(Integer id) {
        return null;
    }


    @Override
    public int insertData(Spinguser spinguser) {
        return spinguserMapper.insert(spinguser);
    }

    @Override
    public int updateUsers(User user) {
        return 0;
    }

    @Override
    public List<User> selectSpinguserByPage(Integer pageOffset, Integer pageSize) {
        return spinguserMapper.selectSpinguserByPage(pageOffset,pageSize);
    }


    @Override
    public int allPages() {
        return spinguserMapper.allPages();
    }

    @Override
    public List<Spinguser> selectAll() {
        return spinguserMapper.selectAll();
    }

    @Override
    public Spinguser updateByName(String name) {
        return null;
    }

    @Override
    public Spinguser selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKey(Spinguser spinguser) {
        return spinguserMapper.updateByPrimaryKey(spinguser);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return spinguserMapper.deleteByPrimaryKey(id);
    }


//    @Override
//    public int deleteByPrimaryKey(Spinguser spinguser) {
//        return spinguserMapper.deleteByPrimaryKey(spinguser);
//    }


    @Override
    public Spinguser selectByName(String name) {
        return spinguserMapper.selectByName(name);
    }


}
